package com.example.cms.controller;

import com.example.cms.entity.Options;
import com.example.cms.pojo.Mesagge;
import com.example.cms.service.QuestionnairedService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @ClassName OptionsContorller
 * @Descriptiom TODO
 * @Author Sunbird
 * @Date 2018/12/19 22:56
 * @Version 1.0
 **/
@RestController
public class OptionsContorller  {
    @Autowired
    private QuestionnairedService questionnairedService;
    @RequestMapping("options")
    public List<Options> OptionAllinfo(@Param("QuestionnaireFileId") Integer QuestionnaireFileId, HttpServletRequest request){
     String id =   request.getParameter("QuestionnaireFileId");
     return questionnairedService.optionsByQuestionnaireFileId(QuestionnaireFileId);
    }
    @RequestMapping("updataOptions")
    public Mesagge updataOptions(Options options,Mesagge mesagge){
        return mesagge;
    }

}
